package com.tsunami.authority.entity.core;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tsunami.authority.enums.common.ComStatus;
import com.tsunami.authority.enums.common.DelFlag;
import com.tsunami.base.entity.Entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 部门管理
 *
 * @author tnmi
 * @date 24 2022/10/24
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@TableName("tnm_core_dept")
@Schema(description = "部门管理")
public class Dept extends Entity<Long> {
    @Schema(description = "租户号")
    @TableField(value = "tenant_id")
    private Long tenantId;
    /**
     * 父部门ID
     */
    @Schema(description = "父部门ID")
    @TableField(value = "parent_id")
    private Long parentId;
    /**
     * 祖级列表
     */
    @Schema(description = "祖级列表")
    @TableField(value = "ancestors")
    private String ancestors;
    /**
     * 部门名称
     */
    @Schema(description = "部门名称")
    @TableField(value = "name")
    private String name;
    /**
     * 部门编码
     */
    @Schema(description = "部门编码")
    @TableField(value = "code")
    private String code;
    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序")
    @TableField(value = "sort")
    private String sort;
    /**
     * 负责人
     */
    @Schema(description = "负责人")
    @TableField(value = "leader")
    private Long leader;
    /**
     * 联系电话
     */
    @Schema(description = "联系电话")
    @TableField(value = "phone")
    private String phone;
    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    @TableField(value = "email")
    private String email;
    /**
     * 部门状态
     */
    @Schema(description = "部门状态")
    @TableField(value = "status")
    private ComStatus status;
    /**
     * 删除标志
     */
    @Schema(description = "删除标志")
    @TableField(value = "del_flag")
    private DelFlag delFlag;

    /**
     * 部门类型
     */
    @Schema(description = "部门类型")
    @TableField(value = "type")
    private Long type;
    /**
     * 部门类型
     */
    @Schema(description = "学制（年）")
    @TableField(value = "num")
    private Integer num;
    /**
     * 叶子节点
     */
    @Schema(description = "是否叶子节点")
    @TableField(value = "leaf")
    private Boolean leaf;
}
